﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ch4_class
{
    class Cat
    {
        string name;
        double weight;
        int age;
        public Cat(string name)
        {
            this.name = name;
        }
        public Cat(string name, double weight, int age)
        {
            this.name = name;
            this.weight = weight;
            this.age = age;
        }

        public void grow()
        {
            age++;
            weight = weight + 0.5;
        }
        public string getName()
        {
            return name;
        }

        public double getWeight()
        {
            return weight;
        }
        public void showInformation()
        {
            Console.WriteLine("The name of cat is {0}. The weight of cat is {1}. The age of cat is {2}", name, weight, age);
        }


    }
}
